﻿<DebuggerDisplay("Goto {TargetStateIndex} At {ConditionSymbol.ToString()}")> _
Public Class LR1Goto
    Implements ILR1Action

    Private m_conditionSymbol As NonTerminal
    Public ReadOnly Property ConditionSymbol() As NonTerminal
        Get
            Return m_conditionSymbol
        End Get
    End Property

    Private m_targetState As Integer
    Public ReadOnly Property TargetStateIndex() As Integer
        Get
            Return m_targetState
        End Get
    End Property

    Public Sub New(ByVal targetState As Integer, ByVal condition As NonTerminal)
        Contract.ArgumentNotNull(condition, "condition")

        m_conditionSymbol = condition
        m_targetState = targetState
    End Sub

    Private ReadOnly Property ConditionSymbolInternal() As ProductionSymbol Implements ILR1Action.ConditionSymbol
        Get
            Return m_conditionSymbol
        End Get
    End Property
End Class
